# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dialog
pkgver=1.3.20240307
_pkgver=${pkgver%.*}-${pkgver##*.}
pkgrel=0
pkgdesc="Script interpreter providing curses widgets"
url="https://invisible-island.net/dialog/dialog.html"
arch="all"
license="LGPL-2.1-only"
makedepends="ncurses-dev"
subpackages="$pkgname-doc $pkgname-static"
source="https://invisible-mirror.net/archives/dialog/dialog-$_pkgver.tgz"
builddir="$srcdir/$pkgname-$_pkgver"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-ncursesw
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
a3d3c4c2a9fb45f1a06ca1789e92913072c5401af9d90b362cbaaf5d35bff97f16186da20de32a7c8eec24638be15983916978615db06c1b33abd34a180ea461  dialog-1.3-20240307.tgz
"
